"""mysite URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
import mysite.settings as settings
from django.contrib import admin

from django.conf.urls import url, include
from django.urls import path


urlpatterns = [
    path('admin/', admin.site.urls),
    # url(路径， include((应用路径，应用名), namespace=路由命名空间)
    url(r'^no_2/', include(('no_2.urls', "No2"), namespace="no_2")),
    url(r'^no_3/', include(('no_3.urls', "No3"), namespace="no_3")),
    url(r'^no_4/', include(('no_4.urls', "No4"), namespace="no_4")),
    url(r'^no_5/', include(('no_5.urls', "No5"), namespace="no_5")),
    url(r'^no_6/', include(('no_6.urls', "No6"), namespace="no_6")),
]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns = [
        path('__debug__/', include(debug_toolbar.urls)),
        # For django versions before 2.0:
        # url(r'^__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns
